// pages/combo/combo.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    comboData:[   //推荐套餐数据
      {
        combo:"combo1",
        price:"price1",
        time:'time1',
        hospital:"hospital1"
      },
      {
        combo:"combo2",
        price:"price2",
        time:'time2',
        hospital:"hospital2"
      },
      {
        combo:"combo3",
        price:"price3",
        time:'time3',
        hospital:"hospital3"
      },
      {
        combo:"combo4",
        price:"price4",
        time:'time4',
        hospital:"hospital4"
      },
    ]

  },
  //查看套餐
  reservation(e)
  {
    var index=e.currentTarget.id;
    console.log(index)   //输出点击的下标 
    console.log(this.data.comboData[index])
    wx.navigateTo({
      url: '/pages/comboInformation/comboInformation?combo='+this.data.comboData[index].combo+'&'+'price='+this.data.comboData[index].price+'&'+'time='+this.data.comboData[index].time+'&'+'hospital='+this.data.comboData[index].hospital
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})